<template>
  <div class="detailsTable">
    <el-table
      class="w-details-tableList"
      :max-height="tableHeight"
      :data="tableData"
      row-key="getRowKey"
      fit
      border
      stripe
      highlight-current-row
      @select-change="handleSelectionChange"
      @select="handleSelect"
      @select-all="handleSelect"
    >
      <el-table-column type="selection" width="40"></el-table-column>
      <el-table-column type="index" label="序号" :index="indexMethod" width="40"></el-table-column>
      <el-table-column label="名称" property="name" width="120">
        <template slot-scope="scope">
          <span style="cursor:pointer" @click="nameClick(scope.row)">{{scope.row.name}}</span>
        </template>
      </el-table-column>
      <el-table-column label="值" property="value" show-overflow-tooltip></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      multipleSelection: [],
      selectList: [],
      tableData: [
        { name: "ww域", value: "183" },
        { name: "rr域", value: "184" },
      ],
    };
  },
  methods: {
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handleSelect(val) {
      this.selectList = val;
    },
    getRowKey(row){
        return row.id
    }
  },
};
</script>
<style lang="scss" scoped>
.detailsTable {
  overflow: hidden;
}
.w-details-tableList {
  ::v-deep .el-tabs__content {
    height: calc(100%-46px);
  }
}
</style>